package com.yanh.product.entity;

import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.yanh.jcommon.valid.EnumString;
import com.yanh.jcommon.valid.ValidGroup;
import jakarta.validation.constraints.Min;
import jakarta.validation.constraints.NotBlank;
import lombok.Data;

import java.io.Serializable;

/**
 * 品牌
 * @author
 * @email
 * @date
 */
@Data
@TableName("pms_brand")
public class BrandEntity implements Serializable {
	private static final long serialVersionUID = 1L;

	/**
	 * 品牌id
	 */
	@TableId
	private Long brandId;
	/**
	 * 品牌名
	 */
	@NotBlank(groups = ValidGroup.Crud.Create.class,message = "品牌名不能为空")
	@EnumString(groups = ValidGroup.Crud.Create.class,value = {"F","M"}, message="品牌只允许为F或M")
	private String name;
	/**
	 * 排序
	 */
	@Min(groups = ValidGroup.Crud.Update.class,value = 1,message = "排序必须大于等于1")
	private Integer sort;
	/**
	 * 品牌logo地址
	 */
	private String logo;
	/**
	 * 介绍
	 */
	@NotBlank(groups = ValidGroup.Crud.Update.class,message = "介绍不能为空")
	private String descript;
	/**
	 * 显示状态[0-不显示；1-显示]
	 */
	private Integer showStatus;
	/**
	 * 检索首字母
	 */
	private String firstLetter;


}
